package com.gxk.dao;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;

public class DiskData implements Data {

	private Preferences preferences = Gdx.app.getPreferences("ranking");

	@Override
	public int loadData() {
		return preferences.getInteger("maxScore");
	}

	@Override
	public void saveData(int maxScore) {
		preferences.putInteger("maxScore", maxScore);
		preferences.flush();
	}
}
